home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.3
/
GetFontStr.3
< prev
next >
Wrap
Text File
|
1995-07-25
|
7KB
|
133 lines
TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
Tk_GetFontStruct, Tk_NameOfFontStruct, Tk_FreeFontStruct -
maintain database of fonts
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
XFontStruct *
TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_i_n_t_e_r_p, _t_k_w_i_n, _n_a_m_e_I_d))))
char *
TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter to use
for error
reporting.
Tk_Window _t_k_w_i_n (in) Token for window in
which font will be
used.
Tk_Uid _n_a_m_e_I_d (in) Name of desired
font.
XFontStruct *_f_o_n_t_S_t_r_u_c_t_P_t_r (in) Font structure to
return name for or
delete.
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt loads the font indicated by _n_a_m_e_I_d and returns a
pointer to information about the font. The pointer returned
by TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt will remain valid until TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt is called
to release it. _N_a_m_e_I_d can be either a font name or pattern;
any value that could be passed to XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt may be
passed to TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt. If TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt is unsuccessful
(because, for example, there is no font corresponding to
_n_a_m_e_I_d) then it returns NNNNUUUULLLLLLLL and stores an error message in
_i_n_t_e_r_p->_r_e_s_u_l_t.
TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt maintains a database of all fonts it has
allocated. If the same _n_a_m_e_I_d is requested multiple times
(e.g. by different windows or for different purposes), then
additional calls for the same _n_a_m_e_I_d will be handled very
quickly, without involving the X server. For this reason,
it is generally better to use TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt in place of X
Page 1 (printed 7/23/95)
TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))
library procedures like XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt.
The procedure TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is roughly the inverse of
TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt. If its _f_o_n_t_S_t_r_u_c_t_P_t_r argument was created
by TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt, then the return value is the _n_a_m_e_I_d
argument that was passed to TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt to create the
font. If _f_o_n_t_S_t_r_u_c_t_P_t_r was not created by a call to
TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt, then the return value is a hexadecimal
string giving the X identifier for the associated font.
Note: the string returned by TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is only
guaranteed to persist until the next call to
TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.
When a font returned by TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt is no longer needed,
TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt should be called to release it. There should be
exactly one call to TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt for each call to TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt.
When a font is no longer in use anywhere (i.e. it has been
freed as many times as it has been gotten) TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt will
release it to the X server and delete it from the database.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
font
Page 2 (printed 7/23/95)